home *** CD-ROM | disk | FTP | other *** search
- PSGrind -- Program formatting utility. Produces PostScript.
- Amiga support by dylan mcnamee
- dylan@cs.washington.edu
-
- Grind is a classic utility that formats source code quite nicely. It can
- do cute things like italicize comments, embolden keywords, print inobtrusive
- line numbers, and labels each page with the function defined on that page
- (or the last one, if there are more than one).
-
- PSGrind is a grind that produces postscript. (Grind traditionally spits out
- troff commands. Vgrind spits out LaTeX.) A set of rules in the vgrindef file
- (put in s: by default) describes to grind how to format the language of your
- choice. Currently defined languages are:
-
- modula2
- pascal
- icon
- C
- C++ (I added support for this)
- lisp
- sh
- csh
- ldl
- TeX
- prolog
- ratfor
- yacc
- asm68
- a68
- asm
- PostScript
- fortran
- REXX
-
- ------------
- Installation
-
- Copy psgrind to a directory on your execution path. It's small, so it would
- fit fine in most people's c: directory. (approx 20 K)
-
- Copy vgrindef and vinit.ps to s:
-
- (Typing make install does this, if you're lucky.)
-
- -------------
- Configuration
-
- Currently, you have to recompile psgrind to change anything (besides the
- language definitions). For example, if you didn't want the config files
- to live in s:, change the makefile location for LIBDIR, which is s: by default.
-
- --------
- Examples
-
- psgrind pfontedp.c > t:grind.ps
-
- Produces in t:grind.ps a PostScript file containing the formatted version of
- the file pfontedp.c
-
- psgrind -lrexx rexx:compile.rexx > t:rexxgrind.ps
-
- Chooses rexx as the language to format for.
-
- psgrind -2 pfontedp.c > t:grind.ps
-
- Saves paper by producing 2 pages of formatted output per piece of paper.
- (Similar to but prettier (and slower) than enscript -2r)
-
- -------
- Options
-
- -h specifies header for each page (defaults to file name)
-
- -wide formats for 132 column printouts
-
- -2 specifies 2 pages per physical page
-
- - use stdin as input
-
- -n suppress bold keywords
-
- -l specify language
-
- -l specify language description file
-
- -----------
- Limitations
-
- Tabs work better than spaces for indenting, because psgrind's output uses
- proportional fonts.
-
- Functions must be defined with the function name and its arguments all
- on the same line. The type needs to be on the line above. This is because
- grind uses a pretty simple parser to determine what is a function definition.
-
- No choice for fonts.
-